#ifndef __MCS__FUNCTION_NOT_FOUND_EXCEPTION__HPP
#define __MCS__FUNCTION_NOT_FOUND_EXCEPTION__HPP

#include "CompileException.hpp"
#include "FunctionSignature.hpp"

class FunctionNotFoundException : public CompileException
{
public:
	FunctionNotFoundException(FunctionSignature const & signature, SourceLocation const & location)
		: CompileException(location), signature_(signature)
	{}

	FunctionSignature const & signature() const { return signature_; }

	virtual std::ostream & stream(std::ostream & str) const
	{
		return CompileException::stream(str) << "function \"" << signature_ << "\" is not defined";
	}
private:
	FunctionSignature signature_;
};

#endif //__MCS__FUNCTION_NOT_FOUND_EXCEPTION__HPP
